import React from 'react'
import {Outlet,useNavigate}from 'react-router-dom'

export default function Home() {

  const navigate = useNavigate()
  const toMusicHandle=()=>{
    navigate('/main/home/music?user=周杰伦&music=《战火》')
  }
  const toNewsHandle=()=>{
    navigate('/main/home/news?user=张杰&music=《轮回》')
  }
  return (
    <div>
      <h2>我是Home内容</h2>
      <button onClick={toMusicHandle}>Music</button>
      <button onClick={toNewsHandle}>News</button>
      <Outlet/>
    </div>
  )
}
